<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="title" content="Ảnh chế hài hước | Video hot | Truyện cười">
<meta name="description"
	content="Duyệt ảnh hài thư giãn mỗi ngày - Trúng tiền Triệu mỗi tuần - Nhận Iphone hàng tháng">
<meta name="keywords"
	content="Ảnh chế, hài hước, video hot, truyện cười, trúng thưởng, trollvl">
<meta property="og:url" content="http://www.trollvl.com/">
<meta property="og:title" content="Ảnh chế hài hước - Video hot - Truyện cười">
<meta property="og:description"
	content="Duyệt ảnh hài thư giãn mỗi ngày - Trúng tiền Triệu mỗi tuần - Nhận Iphone hàng tháng">
<meta property="og:image"
	content="http://trollvl.com/resources/images/troll.jpg">
<meta property="og:site_name" content="Trollvl.com">
<meta property="fb:app_id" content="299999716845708">
<meta property="og:type" content="website">
<link rel="shortcut icon" href="/resources/images/favicon.ico"
	type="image/x-icon">
<link rel="icon" href="/resources/images/favicon.ico"
	type="image/x-icon">
<meta http-equiv="X-UA-Compatible" content="IE=9" />
<script src="/resources/js/jquery.1.9.1.min.js"></script>
<script src="/resources/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/resources/js/scrollpagination.js"></script>
<script type="text/javascript" src="/resources/js/photoFunction.js"></script>
<title>Trollvl - Cộng đồng chế ảnh</title>
<script>
	$(function() {
		load_photo();
		gif_hover();
	});
</script>
</head>
<body>
	<tiles:insertDefinition name="defaultTemplate">
		<tiles:putAttribute name="body">
			<div id="mainContainer">
				<c:if test="${message != null}">
					<div class="alert alert-success" role="alert"
						style="padding: 8px 5px; margin-bottom: 10px;">${message}</div>
				</c:if>
				<div id="mainBox" class="mainBox">
					<div class="subHeading">
						<h3>Ảnh Mới</h3>

					</div>
					<div id="trollsContent" class="newsList">
						<c:forEach items="${trollList}" var="trollItem">
							<div class="newsListItem">
								<div class="listItemSeparator"></div>
								<c:choose>
									<c:when test="${trollItem.url.lastIndexOf('.gif') != -1}">
										<div class="trollThumbnail hide">
									</c:when>
									<c:otherwise>
										<div class="trollThumbnail">
									</c:otherwise>
								</c:choose>
								<a href="/photo/${trollItem.id}" target="_blank"> <c:choose>
										<c:when test="${trollItem.sexy == 'Y'}">
											<img src="/resources/images/nhaycam.jpg"
												alt="${trollItem.title}" class="thumbImg">
										</c:when>
										<c:otherwise>
											<img src="/resources/data/photos/${trollItem.url}"
												alt="${trollItem.title}" class="thumbImg">
										</c:otherwise>
									</c:choose>
								</a>
							</div>
							<c:if test="${trollItem.url.lastIndexOf('.gif') != -1}">
								<div class="trollThumbnail gif-post">
									<c:choose>
										<c:when test="${trollItem.sexy == 'Y'}">
											<img class="thumbImg badge-item-img"
												src="/resources/images/nhaycam.jpg">
										</c:when>
										<c:otherwise>
											<img class="thumbImg badge-item-img"
												src="/resources/data/photos/${trollItem.url.replace('.gif','.jpg')}">
										</c:otherwise>
									</c:choose>
									<span class="play-gif">GIF</span>
								</div>
							</c:if>
							<div class="info" style="position: relative;">
								<h2>
									<a target="_blank" href="/photo/${trollItem.id}">${trollItem.title}</a>
								</h2>
								<div class="uploader">
									Đăng bởi <a href="/uploader/${trollItem.uploader.id}">${trollItem.uploader.name}</a>
								</div>
								<div class="stats">
									<div class="viewComments">
										<span class="views" title="lượt xem"><fmt:formatNumber
												pattern="#,###,##0" value="${trollItem.viewNumber}" /></span> <span
											class="comments" title="lượt bình luận"><fmt:formatNumber
												pattern="#,###,##0" value="${trollItem.commentNumber}" /></span>
									</div>
									<div class="likesWrapper">
										<fb:like class="fb-like" data-href="photo/${trollItem.id}"
											data-width="90" data-layout="button_count" data-action="like"
											data-show-faces="false" data-share="true"></fb:like>
									</div>
								</div>
							</div>
					</div>
					</c:forEach>
					<div style="width: 100%; text-align: center;margin: auto;">
					<script async
								src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
							<!-- trollvl02 -->
							<ins class="adsbygoogle"
								style="display: inline-block; width: 320px; height: 50px"
								data-ad-client="ca-pub-6063658741891951"
								data-ad-slot="4557785023"></ins>
							<script>
								(adsbygoogle = window.adsbygoogle || [])
										.push({});
							</script>
					</div>
				</div>
				<div id="loader" class="loader">
					<span></span> <span></span> <span></span> Loading...
				</div>

				<script async
					src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
				<!-- trollvl03 -->
				<ins class="adsbygoogle"
					style="display: inline-block; width: 728px; height: 90px"
					data-ad-client="ca-pub-6063658741891951" data-ad-slot="6034518223"></ins>
				<script>
					(adsbygoogle = window.adsbygoogle || []).push({});
				</script>

			</div>
			</div>
		</tiles:putAttribute>
	</tiles:insertDefinition>
</body>
</html>